<!DOCTYPE html>
<html lang="en">
<head>
    <{include file="header.html"}>
    <title>网校管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
</head>
<body>
<div class="wrap">
    <!--star left-->
    <div class="column">
        <{include file="left_menu.html"}>
    </div>
    <div id="ContMianBox">
       <!--star子栏目-->
            <{include file="left_menu_min.html"}>
        <!--end子栏目-->
        <!--end left-->
        <div class="container narrow">
            <!--star conter-->
            <div class="cetContent">
                <div class="tit p-lr20">
                    <span><a href="/school">导航设置</a></span>
                    <!-- <span><a href="/school/info">基本资料</a></span> -->
                    <span><a href="/school/modulars">首页模块设置</a></span>
                    <span><a href="/advertising">网校Banner</a></span>
                    <span><a href="/school_page">网校页面</a></span>
                    <span class="curr"><a href="javascript:;">微信支付设置</a></span>
                </div>
                <!--star内容区域-->
                <div class="mainScroll">
                    <div class="mainContainer line-all">
                        <!--star tabMainCont-->
                        <div class="tabMainCont">
                            <form class="layui-form layui-form-pane" method="post" enctype="multipart/form-data">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">公众账号ID</label>
                                    <div class="layui-input-block">
                                        <{if isset($info.app_id) && $info.app_id != ''}>
                                        
                                         <input type="text" value="<{$info.app_id}>" disabled class="layui-input">
                                        <{else}>
                                        <input type="text" name="app_id" value="" lay-verify="required" autocomplete="off" class="layui-input">
                                        <{/if}>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">商户ID</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="mch_id" value="<{$info.mch_id|default:''}>" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">支付密钥</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="apikey" value="<{$info.apikey|default:''}>" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">AppSecret</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="app_secret" value="<{$info.app_secret|default:''}>" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">微信号类型</label>
                                    <div class="layui-input-block">
                                        <select name="app_type">
                                            <option value="0" <{if $info.app_type == 0}>selected<{/if}>>订阅号</option>
                                            <option value="1" <{if $info.app_type == 1}>selected<{/if}>>服务号</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">公众号名称</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="app_name" value="<{$info.app_name|default:''}>" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-form-item layui-form-text">
                                    <input type="hidden" id="mysrc" value="/upload/cert" />
                                    <input type="hidden" id="key" value="<{$apiclient_cert}>.pem" />
                                    <label class="layui-form-label">证书apiclient_cert.pem</label>
                                    <div class="layui-input-block" style="margin-top: 5px;">
                                        <div id="uploader1" class="upload_box" style="float:left; width:420px;">
                                            <div class="queueList">
                                                <div id="dndArea1" class="placeholder dndArea">
                                                    <div id="filePicker1" class="filePicker"></div>
                                                    <p>或将文件拖到这里</p>
                                                </div>
                                            </div>
                                            <div class="statusBar" style="display:none;">
                                                <div class="progress">
                                                    <span class="text">0%</span>
                                                    <span class="percentage"></span>
                                                </div><div class="info"></div>
                                                <div class="btns">
                                                    <div id="filePickerBut1" class="filePickerBut"></div><div class="uploadBtn">开始上传</div>
                                                </div>
                                            </div>
                                            <div class="upload_img_input" input_name='apiclient_cert'></div>
                                        </div>
                                        <{if isset($info['apiclient_cert']) AND $info['apiclient_cert'] != ''}>
                                            <div class="layui-inline" style="float:left;"><{$info['apiclient_cert']}></div>
                                        <{/if}>
                                    </div>
                                </div>

                                <div class="layui-form-item layui-form-text">
                                    <input type="hidden" id="mysrc" value="/upload/cert" />
                                    <input type="hidden" id="key" value="<{$apiclient_key}>.pem" />
                                    <label class="layui-form-label">证书apiclient_key.pem</label>
                                    <div class="layui-input-block" style="margin-top: 5px;">
                                        <div id="uploader2" class="upload_box" style="float:left; width:420px;">
                                            <div class="queueList">
                                                <div id="dndArea2" class="placeholder dndArea">
                                                    <div id="filePicker2" class="filePicker"></div>
                                                    <p>或将文件拖到这里</p>
                                                </div>
                                            </div>
                                            <div class="statusBar" style="display:none;">
                                                <div class="progress">
                                                    <span class="text">0%</span>
                                                    <span class="percentage"></span>
                                                </div><div class="info"></div>
                                                <div class="btns">
                                                    <div id="filePickerBut2" class="filePickerBut"></div><div class="uploadBtn">开始上传</div>
                                                </div>
                                            </div>
                                            <div class="upload_img_input" input_name='apiclient_key'></div>
                                        </div>
                                        <{if isset($info['apiclient_key']) AND $info['apiclient_key'] != ''}>
                                            <div class="layui-inline" style="float:left;"><{$info['apiclient_key']}></div>
                                        <{/if}>
                                    </div>
                                </div>

                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>

                            </form>

                        </div>
                        <!--star会员管理-->
                    </div>
                        <!--end tabMainCont-->
                </div>

            </div>
        </div>

    </div>
</div>
<{include file="footer.html"}>
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form();
        form.on('select(province)',function(data){
            var ii = layer.load();
            var province_code = data.value;
            $("#province_name").val($("#province option:selected").text())
            $("#city_name").val('');
            $("#area_name").val('');
            $("#city").html('<option value="">请选择城市</option>');
            $("#district").html('<option value="">请选择区域</option>');
            form.render('select');
            $.ajax({
                type: "GET",
                url: "/area/get_area_by_parent/"+province_code,
                dataType:"json",
                success: function(result){
                    var html ='';
                    $.each(result, function(i, obj) {
                        html += '<option value="'+obj.area_code+'">'+obj.area_name+'</option>';
                    });
                    $("#city").append(html);
                    form.render('select');
                    layer.close(ii);
                }
            });
        });

        form.on('select(city)',function(data){
            var ii = layer.load();
            var city_code = data.value;
            $("#city_name").val($("#city option:selected").text())
            $("#area_name").val('');
            $("#district").html('<option value="">请选择区域</option>');
            form.render('select');
            $.ajax({
                type: "GET",
                url: "/area/get_area_by_parent/"+city_code,
                dataType:"json",
                success: function(result){
                    var html ='';
                    $.each(result, function(i, obj) {
                        html += '<option value="'+obj.area_code+'">'+obj.area_name+'</option>';
                    });
                    $("#district").append(html);
                    form.render('select');
                    layer.close(ii);
                }
            });
        });

        form.on('select(district)',function(data){
            $("#area_name").val($("#district option:selected").text())
        });
    });
</script>
</body>
</html>